package com.hksj.common.core.common;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author fjt
 * @data 2024/7/18 14:23
 * @describe 专业代码和产品代码
 */
public enum SpecialityModelCodeEnum {

    // 专业代码
    computer_room_security("JFAQ", "机房安全"),
    medical_gas("YQ", "医气"),
    differential_pressure("YC", "压差"),
    air_quality("KQZL", "空气质量"),
    cleanliness("JJD", "洁净度"),
    air_conditioning("KTJZ", "空调机组"),
    energy_consumption("NHJC", "能耗监测"),
    smart_lighting("ZNZM", "智能照明"),
    special_facility_temperature_control_management("ZYSSWD", "专用设施温度"),
    special_gas_leakage("TQXL", "特气泄漏"),
    wireless_leak_water("LSJC", "无线漏水"),
    video_monitoring("SPJK", "视频监控"),
    uv_lamp_control("ZWXQK", "紫外线灯群控"),
    ammonia_monitor("AQJC", "氨气监测"),
    liquid_nitrogen("YDJC", "液氮罐监测"),
    environment_management("HJGL", "环境管理"),



    vav_control("BFL", "VAV变风量控制"),
    vav_fj("VAVFj", "VAV房间变风量设备"),
    vav_bfg("VAVBFG", "VAV变风柜设备"),

    //南宫智慧实验室
    air_conditioning_equipment("KTSB", "环境管理"),



    // 产品代码
    kongtjz_product("Kongtjz", "空调机组监测传感器"),
    ZNZM_product("Kaigkzq", "开关控制器(智能)"),
    LSJC_product("Louscgq", "漏水绳传感器"),


    // 特气泄漏产品
    Teqxl_product("Teqxl", "特气泄漏监测传感器"),
    Qityl_product("Qityl", "气体压力传感器"),
    Qityl_Yangq_product("Qityl_Yangq", "氧气压力传感器"),
    Qityl_Danq_product("Qityl_Danq", "氮气压力传感器"),
    Qityl_Eryht_product("Qityl_Eryht", "二氧化碳压力传感器"),
    Qityl_Yaskq_product("Qityl_Yaskq", "压缩空气压力传感器"),
    Qityl_Fuy_product("Qityl_Fuy", "负压压力传感器"),




    // 能耗监测传感器产品
    DianB_product("DianB", "电表"),
    DianB_ZM_product("DianB_ZM", "照明用电"),
    DianB_QT_product("DianB_QT", "其他用电"),
    DianB_CZ_product("DianB_CZ", "插座用电"),
    DianB_KT_product("DianB_KT", "空调用电"),
    ShuiB_product("ShuiB", "水表"),
    ShuiB_SH_product("ShuiB_SH", "生活用水"),
    ShuiB_SB_product("ShuiB_SB", "设备用水"),
    ShuiB_QT_product("ShuiB_QT", "其他用水"),
    // 能耗指标类型
    Lei_ji_dl("Leijdl", "累计电量"),
    Lei_ji_ll("Leijll", "累计流量"),

    //机房安全
    Jfaq_lous("Lous","漏水"),

    Jfaq_Lousjc("Lousjc","漏水监测传感器")


    ;

    private String code;

    private String value;

    SpecialityModelCodeEnum(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public static List<String> getAllCode(){
        return Arrays.stream(SpecialityModelCodeEnum.values()).map(SpecialityModelCodeEnum::getCode).collect(Collectors.toList());
    }


    public static String getVal(String code){
        for (SpecialityModelCodeEnum modelCodeEnum : SpecialityModelCodeEnum.values()) {
            if (modelCodeEnum.code.equals(code)){
                return modelCodeEnum.value;
            }
        }
        return null;
    }


}
